package org.example.dao;

import org.apache.ibatis.annotations.Mapper;
import org.example.domain.Comment;
import org.example.domain.User;

import java.util.List;

@Mapper
public interface CommentDao {
    /**
     * @param entityType  查询那个种类的评论 1-帖子的评论  2-评论的评论   3-课程的评论
     * @param entityId  查询这个种类具体的评论
     * @return
     */
    List<Comment> searchByFilterCondition(int entityType, int entityId,int targetId,int start,int page);
    int saveOne(Comment comment);
    int searchCount(int entityType,int entityId,int targetId);
    User searchReplyUser(int commentId);
    List<Integer> searchUserPublishCommentIds(int userId);
    Comment searchById(int commentId);
}
